HIL testing is used for development and testing of embedded systems. The present invention relates to the use of virtual inputs and outputs in combination with a test controlling system to automate HIL testing. The test controlling system handles automation and coordination of the virtual inputs and outputs to produce a coherent test and associated test reports and documentation. In accordance with a preferred embodiment of the invention, a J1939 controller area network (CAN) is utilized to associate the virtual inputs and outputs to the test controlling system as well as connecting the test controlling system to the embedded system. Several communication networks can serve this purpose.
The method of diagnostic testing has at least two methods of operation. First, the test controlling system can monitor the input port and/or the output port of the embedded tested system for input values and output values, respectively. The test controlling system can send CAN messages to an embedded system to enable reading of input values and/or output values of associated memory locations, respectively. The embedded system will then send a response containing value(s) of requested input and/or output. Under this mode of operation the test controlling system allows for detection of problems at three possible areas: (1) prior to an embedded system, including any electrical conductors operably coupling an input device to an embedded system; (2) the embedded system, including the embedded system's decision making processes; and (3) after the embedded system, including any electrical conductors operably coupling an output device to the embedded system. In a tested apparatus with several connected embedded systems, the test controlling system is useful to determine which embedded system is faulty faster than individually testing each embedded system.
Second, the test controlling system can modify and replace input values. Under this mode of operation, the test controlling system overrides predefined input values to replace them with input values supplied by the test controlling system. One embodiment involves initialization of virtual inputs and outputs by use of a CAN override message sent by the test controlling system. The test controlling system provides input values to an embedded system. Then the test controlling system monitors the embedded system's output values and/or writes the embedded system's output values to a separate memory location. Finally the test controlling system produces coherent test and associated test reports and documentation. In a variation, the embedded system has read-only access to the modified input value. The purpose of providing the embedded system with read-only access is to prevent tampering of the input value and to disable the embedded system's ability to modify the input value in memory. In an alternative variation, the embedded system has the modified input value stored in a memory location separate from the embedded system's typical memory location.